package com.snow.campuslink.user.converter.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Describe //TODO
 * @ClassName UserRegisterDto
 * @Author Gaosl
 * @Date 2021/2/7 11:34
 */
@Data
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@ApiModel(value="用户注册")
public class UserRegisterDto implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull(message = "用户名不能为空")
    @Length(min = 1,max = 15,message = "用户名长度应在1-15个字符之间")
    @ApiModelProperty(value = "用户名")
    private String username;

    @Email(message = "电子邮箱地址不合法")
    @ApiModelProperty(value = "用户电子邮箱地址")
    private String email;

    @NotNull(message = "密码不能为空")
    @Length(min = 6,max = 15,message = "密码长度应在6-15个字符之间")
    @ApiModelProperty(value = "用户密码")
    private String password;

    @NotNull(message = "验证码不能为空")
    private String verificationCode;

}
